Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMS-3162: tests: add initial testing farm integration #36

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

mvo5
Copy link
Collaborator

@mvo5 mvo5 commented Dec 6, 2023

This adds initial testing farm integration via a github action. To run jobs on testing farm a token is required that is stored as a repository secret. For security reasons repository secrets are not visible accross forks [0].

There are multiple ways to work around this limiation, this commit goes with the suggestion from [1], i.e.: the workflow is run within the pull_request_target trigger which has access to secrets.

This means the (potentially untrusted) branch is only checked out if the person triggering the workflow has already write access to the repository (we could make this restriction strong but it seems a reasonable permisson level). In practise the workflow will fail for outside contributions but a re-trigger from anyone in the term should be enough to get it tested inside the testing farm.

[0] https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
[1] https://michaelheap.com/access-secrets-from-forks/

@ochosi ochosi changed the title tests: add initial testing farm integration HMS-3162: tests: add initial testing farm integration Dec 6, 2023
@mvo5 mvo5 force-pushed the tmt-smoke-in-testfarm-via-gh-action branch from 2f511f4 to d39dcef Compare December 7, 2023 09:15
This adds initial testing farm integration via a github action.
To run jobs on testing farm a token is required that is stored
as a repository secret. For security reasons repository secrets
are not visible accross forks [0].

There are multiple ways to work around this limiation, this commit
goes with the suggestion from [1], i.e.: the workflow is run within
the `pull_request_target` trigger which has access to secrets.

This means the (potentially untrusted) branch is only checked out
if the person triggering the workflow has already write access to
the repository (we could make this restriction strong but it seems
a reasonable permisson level). In practise the workflow will fail
for outside contributions but a re-trigger from anyone in the term
should be enough to get it tested inside the testing farm.

[0] https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
[1] https://michaelheap.com/access-secrets-from-forks/
@mvo5 mvo5 force-pushed the tmt-smoke-in-testfarm-via-gh-action branch from d39dcef to f79014d Compare December 7, 2023 11:00
@mvo5 mvo5 marked this pull request as ready for review December 7, 2023 11:00
Copy link
Member

@thozza thozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thrix
Copy link

thrix commented Dec 7, 2023

LGTM from Testing Farm side, it is sad it cannot be tested on MR :)

As discussed on Slack, if you would need /dev/kvm

  1. use the RH ranch token
  2. use this in the hardware field of the provision plugin in the plan
hardware:
  virtualization:
    is-supported: true

Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ondrejbudai ondrejbudai added this pull request to the merge queue Dec 7, 2023
@mvo5
Copy link
Collaborator Author

mvo5 commented Dec 7, 2023

LGTM from Testing Farm side, it is sad it cannot be tested on MR :)

As discussed on Slack, if you would need /dev/kvm

1. use the RH ranch token

2. use this in the `hardware` field of the `provision` plugin in the plan
hardware:
  virtualization:
    is-supported: true

Thank you! I updated #34 to include this there.

Merged via the queue into osbuild:main with commit 4bc0ea3 Dec 7, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants